package com.tianhui.consignortwofei.mvp.ui.activity.deliverGoods.edit;

import android.text.TextUtils;
import android.view.View;

import com.tianhui.consignortwofei.mvp.ui.activity.deliverGoods.normal.DeliverGoodsStepFourActivity;

/**
 * @author fgs
 * @date 2021/3/9
 * @description
 **/
public class EditDeliverGoodsStepFourActivity extends DeliverGoodsStepFourActivity {

    @Override
    public void initData() {
        //不能调用super
    }

    @Override
    public void initView() {
        super.initView();
        mGoodsPriceInputItemView.setContent(mGoodsInfo.goodsunitprice);
        mConsignorInputItemView.setContent(mGoodsInfo.clientperson);
        mConsignorPhoneInputItemView.setContent(mGoodsInfo.clienttel);
        //发送对象
        if (!TextUtils.isEmpty(mGoodsInfo.sentto) && mGoodsInfo.sentto.equals("02")) {
            mSendObjectClickItemView.setContent("指定单个承运人");
            mObjectDetailLinearLayout.setVisibility(View.VISIBLE);
            requestDriverList(mGoodsInfo.senttodetails);
        } else {
            mSendObjectClickItemView.setContent("全部");
        }

        //是否推送
        if (!TextUtils.isEmpty(mGoodsInfo.ispush) && mGoodsInfo.ispush.equals("1")) {
            mPushableTabSwitchView.setDefaultSelection(1);
        } else {
            mPushableTabSwitchView.setDefaultSelection(0);
        }

        if (!TextUtils.isEmpty(mGoodsInfo.consumequota)) {
            mRoadTypeTabSwitchView.setDefaultSelection(0);
            mRoadTypeInputItemView.setContent(mGoodsInfo.consumequota);
            mRoadTypeInputItemView.setTitle("路耗计量（kg/车）");
        }
        if (!TextUtils.isEmpty(mGoodsInfo.consumefixedrate)) {
            mRoadTypeTabSwitchView.setDefaultSelection(1);
            mRoadTypeInputItemView.setContent(mGoodsInfo.consumefixedrate);
            mRoadTypeInputItemView.setTitle("路耗计量（‰/车）");
        }
    }
}
